package com.work.mapper.main;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.work.dto.main.OneStockTallySearchDTO;
import com.work.entity.main.OneStockTally;
import com.work.vo.ShiftInfoForAssignWorkVO;
import com.work.vo.main.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 单垛理货Mapper
 *
 * @author ：dujianyu
 * @since ：Created in 2024/3/12 8:49
 */
public interface OneStockTallyMapper extends BaseMapper<OneStockTally> {
    /**
     * 单垛理货历史
     * @param dto 搜索条件
     * @param page 分页
     * @return List<OneStockTallyVO>
     * @author dujianyu
     * @since 2024/3/20 10:24
     */
    List<OneStockTallyVO> selectOsTallyHistoryList(@Param("dto") OneStockTallySearchDTO dto, IPage page);

    /**
     * 审核分页
     * @param  dto 搜索条件
     * @param  page 分页
     * @return List<OneStockTallyCheckVO>
     * @author dujianyu
     * @since 2024/6/7 10:01
     */
    List<OneStockTallyCheckVO> selectCheckList(@Param("dto") OneStockTallySearchDTO dto, IPage page);

    /**
     * 工班解锁列表
     * @param dto 搜索条件
     * @param page 分页
     * @return List<OneStockTallyUnlockVO>
     * @author dujianyu
     * @since 2024/6/14 10:30
     */
    List<OneStockTallyUnlockVO> selectUnlockList(@Param("dto") OneStockTallySearchDTO dto, IPage page);

    /**
     * 工班解锁详情
     * @param dto 搜索条件
     * @return OneStockTallyUnlockDetailVO
     * @author dujianyu
     * @since 2024/6/17 15:49
     */
    OneStockTallyUnlockDetailVO selectOstDetail(@Param("dto") OneStockTallySearchDTO dto);

    /**
     * 工班查询与导出
     * @param dto 搜索条件
     * @param page 分页
     * @return List<OneStockTallySearchExportVO>
     * @author dujianyu
     * @since 2024/7/2 13:29
     */
    List<OneStockTallySearchExportVO> selectTallySearchExportList(@Param("dto") OneStockTallySearchDTO dto, IPage page);

    /**
     * 工班查询与导出统计
     * @param dto 搜索条件
     * @return TotalPieceTonVO
     * @author dujianyu
     * @since 2024/7/4 10:11
     */
    TotalPieceTonVO selectTallySearchExportTotal(@Param("dto") OneStockTallySearchDTO dto);

    List<ShiftInfoForAssignWorkVO> shiftInfoByArrangeId(@Param("arrangeId") Long arrangeId);

    ShiftInfoForAssignWorkVO tallyUserAndCheckerBYArrangeId(@Param("arrangeId") Long arrangeId);

    List<ShiftInfoForAssignWorkVO> listTallyInfoByArrangeId(@Param("arrangeId") Long arrangeId, @Param("vo") ShiftInfoForAssignWorkVO vo);
}
